from devicetest.api import Asserts

from devicetest.aw.OpenHarmony import CommonOH
from devicetest.core.test_case import TestCase, Step

from aw.common import common_setup, common_teardown


class PreTest_RK3568_Basic_PowerSystem_0100(TestCase):
    # 预置条件：
    # 烧写目标版本后，正常进入桌面,为唤醒状态
    # 测试步骤：
    # 1按power键进行息屏测试
    # 预期结果：
    # 能进入息屏模式

    def __init__(self, controllers):
        self.TAG = self.__class__.__name__
        TestCase.__init__(self, self.TAG, controllers)

    def setup(self):
        common_setup(self.Phone1)

    def process(self):
        Step('步骤1：按power键')
        CommonOH.pressPowerKey(self.Phone1)
        Step('预期结果1：能进入息屏模式')
        CommonOH.checkScreenStatus(self.Phone1, expect=False)

    def teardown(self):
        common_teardown(self.Phone1)
